<?php 
/**
 * [PHPFOX_HEADER]
 * 
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Raymond Benc
 * @package  		Module_Feed
 * @version 		$Id: display.html.php 4757 2012-09-25 08:21:09Z Raymond_Benc $
 */
 
defined('PHPFOX') or exit('NO DICE!'); 

?>
<script type="text/javascript" src="{$corePath}module/feed/static/jscript/wall.js"></script>
{literal}
<style type="text/css">
.privacy_setting_mini .privacy_setting_holder{
	left: 2px;
}
#id_feed_result_image img{
	width: 120px;
	height: auto;
}
/* customize for advance feed*/
ul.wall_link_list{
	color: #666;
	font-weight: bold;
	font-size: 9px;
	line-height: 15px;
	font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
}
ul.wall_link_list li{
	float:left;
	margin-right: 4px;
	display:block;
}
ul.wall_link_list li a{
	display:block;
}
div#id_feed_result_content{
	margin-left: 130px;
}
span.feed_title{}
div.subtitle a{
	font-size: 85%;
	color: #888;
	text-decoration: none;
	padding: 5px 0;
}
span.feed_description{
	font-size: 90%;
	color: #444;
	padding: 5px 0;
}
span.feed_title{
	font-size: 110%;
	color: #222;
}
a.feed_thumb_link{display:none;}
a.feed_thumb_link img{
	border: none;
	width: 120px;
	height: auto;
}

a.feed_thumb_link_show img{
	width: 120px;
	height: auto;
}

div.feed_wrap div.feed_thumb{
	float:left;
	width: 130px;
}
div.feed_wrap div.feed_thumb a{
	margin: 5px;
}
div.feed_wrap div.feed_thumb a img{
	border: none;
	width: 120px;
}
div.feed_wrap div.feed_inner{
	margin-left: 132px;
}
div.feed_no_thumb div.feed_inner{
	margin-left: 0px;
}
div#id_feed_thumb_manage{display:none;}
div#id_fwall_form_holder{clear:both;}
td.feed_text_input{
	background: #fff;
	border: 1px solid #C6C6C6;
	border-bottom: 1px solid #E3E3E3;
}
td.feed_text_button{
	background: #E8E8E8;
	border: 1px solid #C6C6C6;
	border-bottom: 1px solid #E3E3E3;
	border-left:none;
	text-align: center;
}
td.feed_text_button:hover{
	background: #f1f1f1;
	border: 1px solid #C3C3C3;
	border-bottom: 1px solid #E1E1E1;
	border-left:none;
	text-align: center;
}
a.id_feed_a_attach{
	color: #222;
	font-weight: bold;
}
a.ataic{
	float:right;
	display:block;
	width: 10px;
}
div#atarea{
	border: 1px solid #ccc;
	background: #fff;
	padding: 6px 10px;
}
div#atahd{
	padding: 0px 0px 4px 0px;
	border-bottom: 1px solid #DFDFDF;
}
div#atabd{
	margin: 4px 0;
}

a.wall_next{
	background: url('./module/feed/static/image/wall12.png') no-repeat scroll -48px center;
	padding: 0 8px;
}
a.wall_next:hover{
	background: url('./module/feed/static/image/wall12.png') no-repeat scroll -16px center;
}
a.wall_prev{
	background: url('./module/feed/static/image/wall12.png') no-repeat scroll -32px center;
	padding: 0 8px;
}
a.wall_prev:hover{
	background: url('./module/feed/static/image/wall12.png') no-repeat scroll -0px center;
}
div#atahd div{
	color: #666666;
	font-size: 11px;
	font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
	font-weight: bold;
	padding-left: 21px;
	line-height: 18px;
	background-repeat: no-repeat;
	background-position: left center;
}

a.wall_close{
	background: url('./module/feed/static/image/wall12.png') no-repeat center;
	padding: 0 0 0 8px;
	line-height: 18px;
}
a.wall_link{
	background-position: left center;
  font-family: arial;
	background-repeat: no-repeat;
	line-height: 12px;
	height: 12px;
	display: block;
	padding-left: 21px;
	padding-right: 1px;
	color: #444;
}

div#idfbtnhd{
	float:right;
}
div#idwllhd{
	clear:both;
	margin-top:6px;
}
div#idfhd{margin: 6px 0;}
#id_list_ac{
  display:none;
	position:absolute;
	z-index: 999;
	left:0;
	top: 0;
	border: 1px solid #ddd;
	background: #fff;
	width: 85%;
  overflow: hidden;
}
#id_list_ac li{
	clear: both;
  display:block;
	width: 100%;
  padding: 2px 7px;
  vertical-align: middle;
  font-size: 11px;
}
#id_list_ac li img.ftb_4{
  width: 20px;
  height: 20px;
  margin-right: 10px;
  vertical-align: middle;
}
#id_list_ac li:hover,#id_list_ac li.active{
 background: #6D84B4;
 color: #fff;
}
.fwalledit{
  background: #fff;
	border: solid 1px #c6c6c6;
	border-bottom: solid 1px #e3e3e3;
	color: #333;
}
div.editarea{}
.fhighlighter{
	overflow: hidden;
	position: absolute;
}
 .fhighlighter div{
	color: #fff;
}
.fhighlighter div b{
  font-weight: normal;
  color: #D8DFEA;
	background: #D8DFEA;
}
.feditarea{
	background: transparent;
  position: relative;
}
.ef234{
  font-size: 13px;
	line-height: 16px;
	white-space: pre-wrap;
	word-wrap: break-word;
  font-family: arial;
  padding: 5px;
}
.feditmesure{
  position:absolute;
  left: -1999em;
  top: -1999em;
}
.feditarea .wrap{
	overflow:hidden;
}
.feditarea .wrap textarea{
	width: 100%;
	height: 16px;
	vertical-align: bottom;
  overflow: hidden;
  background: transparent;
  border: none;
  padding: 5px;
  }
  
  #wall {
    margin: 5px 0px 0px 0px;
}
#wall_privacy {
}
#lock {
    cursor: pointer;
    width: 10px;
    height: 12px;
    padding: 3px;
    display: block;
    text-align: center;
     margin-left: 14px;
    margin-top: -4px;
    *margin-top: -20px;
}

.lock_active {
    background: #3399ff url({$imageWall}/check.png) no-repeat;
}

table#privacy {
     background: #FFF;
    display: none;
    z-index: 1000;
    position: absolute;
    margin-left: -108px;
    border: #000 solid 1px;
    width: 140px;
    margin-top: 1px;
}

   .errormessage {
color: black;
background: none repeat scroll 0 0 #EDEFF4;
border: 1px solid #CCCCCC;
}

#privacy tr:hover {
    background: #6D84B4;
    cursor: pointer;
}

#privacy td {
    padding: 3px;
}
#privacy td:hover {
    color: #FFF;
}

.check {
    background-image: url({$imageWall}/check.png);
    width: 15px;
    height: 15px;
    background-repeat: no-repeat;
    font-weight: bold;
    display: none;
}


</style>
{/literal}

{if Phpfox::getService('profile')->timeline()}
<div class="main_timeline" style="background:url('{img theme='layout/timeline.png' return_url=true}') repeat-y 50%;">
{/if}

{if Phpfox::isUser() && !PHPFOX_IS_AJAX && $sCustomViewType === null}
{if (Phpfox::getUserBy('profile_page_id') > 0 && defined('PHPFOX_IS_USER_PROFILE')) 
	|| (isset($aFeedCallback.disable_share) && $aFeedCallback.disable_share) 
	|| (defined('PHPFOX_IS_USER_PROFILE') && !Phpfox::getService('user.privacy')->hasAccess('' . $aUser.user_id . '', 'feed.share_on_wall'))
	|| (defined('PHPFOX_IS_USER_PROFILE') && !Phpfox::getUserParam('profile.can_post_comment_on_profile') && $aUser.user_id != Phpfox::getUserId())
}

{else}
{if !Phpfox::getService('profile')->timeline()}
{template file='feed.block.form'}
{/if}
{/if}
{/if}
{if Phpfox::getParam('feed.refresh_activity_feed') > 0 && Phpfox::getLib('module')->getFullControllerName() == 'core.index-member'}
<div id="activity_feed_updates_link_holder">
    <a href="#" id="activity_feed_updates_link_single" class="activity_feed_updates_link" onclick="return $Core.loadMoreFeeds();">{phrase var='feed.1_new_update'}</a>
    <a href="#" id="activity_feed_updates_link_plural" class="activity_feed_updates_link" onclick="return $Core.loadMoreFeeds();">{phrase var='feed.span_id_js_new_update_view_span_new_updates'}</a>
</div>
{/if}
{if Phpfox::isModule('captcha') && Phpfox::getUserParam('captcha.captcha_on_comment')}
{module name='captcha.form' sType='comment' captcha_popup=true}
{/if}
<div id="feed"><a name="feed"></a></div>
<div id="js_feed_content">
	{if $sCustomViewType !== null}
	<h2>{$sCustomViewType}</h2>
	{/if}
	<div id="js_new_feed_comment"></div>
	<div id="js_new_feed_update"></div>
	{if Phpfox::getService('profile')->timeline()}
	<div>
		{if PHPFOX_IS_AJAX && !empty($sLastDayInfo) && !Phpfox::getLib('request')->get('resettimeline')}
		<div class="timeline_date">
			<span>{$sLastDayInfo}</span>
		</div>
		{/if}
		<div class="timeline_left">			
			{if (!PHPFOX_IS_AJAX && Phpfox::getService('profile')->timeline()) || Phpfox::getLib('request')->get('resettimeline')}
			{if (Phpfox::isUser() && !PHPFOX_IS_AJAX && $sCustomViewType === null) || Phpfox::getLib('request')->get('resettimeline')}
			{if (Phpfox::getUserBy('profile_page_id') > 0 && defined('PHPFOX_IS_USER_PROFILE')) 
				|| (isset($aFeedCallback.disable_share) && $aFeedCallback.disable_share) 
				|| (defined('PHPFOX_IS_USER_PROFILE') && !Phpfox::getService('user.privacy')->hasAccess('' . $aUser.user_id . '', 'feed.share_on_wall'))
				|| (defined('PHPFOX_IS_USER_PROFILE') && !Phpfox::getUserParam('profile.can_post_comment_on_profile') && $aUser.user_id != Phpfox::getUserId())
			}

			{else}			
			<div class="timeline_feed_row">
				<div class="timeline_arrow_left">0</div>
				<div class="timeline_float_left">0</div>			
				<div class="timeline_holder">
					{template file='feed.block.form'}
				</div>
			</div>
			<div class="timeline_left_new"></div>
			{/if}
			{/if}
			{/if}
			{foreach from=$aFeedTimeline.left name=iFeed item=aFeed}
			<div class="timeline_feed_row">
				<div class="timeline_arrow_left">{$aFeed.feed_id}</div>
				<div class="timeline_float_left">{$aFeed.time_stamp|convert_time}</div>
				{template file='feed.block.timeline'}
			</div>		
			{/foreach}
		</div>
		<div class="timeline_right">
			{if !PHPFOX_IS_AJAX || Phpfox::getLib('request')->get('resettimeline')}
			<div class="timeline_feed_row">				
				{module name='friend.timeline'}
			</div>
			{/if}
			{foreach from=$aFeedTimeline.right name=iFeed item=aFeed}
			<div class="timeline_feed_row">
				<div class="timeline_arrow_right">{$aFeed.feed_id}</div>
				<div class="timeline_float_right">{$aFeed.time_stamp|convert_time}</div>
				{template file='feed.block.timeline'}
			</div>
			{/foreach}
		</div>		
		<div class="clear"></div>
	</div>	
	
	{if !PHPFOX_IS_AJAX}
		{foreach from=$aTimelineDates item=aTimelineDate}
			<div id="js_timeline_year_holder_{$aTimelineDate.year}"></div>
			{foreach from=$aTimelineDate.months item=aMonth}
			<div id="js_timeline_month_holder_{$aTimelineDate.year}_{$aMonth.id}"></div>
			{/foreach}
		{/foreach}
	{/if}	
	{else}	
	{foreach from=$aFeeds name=iFeed item=aFeed}
	{if isset($aFeed.feed_mini) && !isset($bHasRecentShow)}
	{if $bHasRecentShow = true}{/if}
	<div class="activity_recent_holder">
	<div class="activity_recent_title">
		{phrase var='feed.recent_activity'}
	</div>
	{/if}
	{if !isset($aFeed.feed_mini) && isset($bHasRecentShow)}
	</div>
	{unset var=$bHasRecentShow}
	{/if}
	
	<div class="js_feed_view_more_entry_holder">
		{template file='feed.block.entry'}
		{if isset($aFeed.more_feed_rows) && is_array($aFeed.more_feed_rows) && count($aFeed.more_feed_rows)}
		{foreach from=$aFeed.more_feed_rows item=aFeed}
		{if $bChildFeed = true}{/if}
		<div class="js_feed_view_more_entry" style="display:none;">
			{template file='feed.block.entry'}
		</div>
		{/foreach}
		{unset var=$bChildFeed}
		{/if}
	</div>	
	{/foreach}
	{/if}
	
	{if isset($bHasRecentShow)}
	</div>
	{/if}	
	{if $sCustomViewType === null}
	{if defined('PHPFOX_IN_DESIGN_MODE')}
	
	{else}
	{if count($aFeeds)}
	<div id="feed_view_more">
		<div id="js_feed_pass_info" style="display:none;">page={$iFeedNextPage}{if defined('PHPFOX_IS_USER_PROFILE') && isset($aUser.user_id)}&profile_user_id={$aUser.user_id}{/if}{if isset($aFeedCallback.module)}&callback_module_id={$aFeedCallback.module}&callback_item_id={$aFeedCallback.item_id}{/if}&year={$sTimelineYear}&month={$sTimelineMonth}</div>
		<div id="feed_view_more_loader">{img theme='ajax/add.gif'}</div>
		<a href="{if Phpfox::getLib('module')->getFullControllerName() == 'core.index-visitor'}{url link='core.index-visitor' page=$iFeedNextPage}{else}{url link='current' page=$iFeedNextPage}{/if}" onclick="$(this).hide(); $('#feed_view_more_loader').show(); $.ajaxCall('feed.viewMore', 'page={$iFeedNextPage}{if defined('PHPFOX_IS_USER_PROFILE') && isset($aUser.user_id)}&profile_user_id={$aUser.user_id}{/if}{if isset($aFeedCallback.module)}&callback_module_id={$aFeedCallback.module}&callback_item_id={$aFeedCallback.item_id}{/if}&year={$sTimelineYear}&month={$sTimelineMonth}', 'GET'); return false;" class="global_view_more no_ajax_link">{phrase var='feed.view_more'}</a>
	</div>
	{else}
	{if Phpfox::getService('profile')->timeline()}
	{module name='user.birth'}
	{else}
	<br />
	<div class="message js_no_feed_to_show">{phrase var='feed.there_are_no_new_feeds_to_view_at_this_time'}</div>
	{/if}
	{/if}
	{/if}
	{/if}
{if !PHPFOX_IS_AJAX || (PHPFOX_IS_AJAX && count($aFeedVals))}
</div>
{/if}
{if Phpfox::getParam('feed.refresh_activity_feed') > 0 && Phpfox::getLib('module')->getFullControllerName() == 'core.index-member'}
<script type="text/javascript">
	$Core.reloadActivityFeed();
</script>
{/if} 

{if Phpfox::getService('profile')->timeline()}
</div>
{/if}